using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Arcadium.Screens.Menus.Sidebar
{
    abstract class SidebarComponent
    {
        public event EventHandler Selected;

        public event EventHandler Deselected;

        internal void Select()
        {
            if (Selected != null)
                Selected(this, null);
        }

        internal void Deselect()
        {
            if (Deselected != null)
                Deselected(this, null);
        }

        public bool IsSelected { get; set; }

        public bool Visible { get; set; }

        public bool LockedFocus { get; set; }

        public virtual void HandleInput(PlayerIndex? ControllingPlayer, InputState input) { }

        public SidebarComponent NextComponent { get; set; }

        public SidebarComponent PreviousComponent { get; set; }
    }
}
